MuleSoft Accelerator for Consumer Goods icon

MuleSoft Accelerator for Consumer Goods

(0 reviews)

SAP S4HANA setup guide

Overview

Overview

The following describes how to configure and test an S/4HANA Cloud SOAP outbound service (Product replication: productmdmbulkreplicaterequest) and the S/4HANA Cloud SOAP Connector as a Mule application deployed on Cloudhub.

Configurations in S/4HANA

To make the necessary configurations in S/4HANA:

  1. Create a Communication System in the corresponding Fiori app. This communication system represents the external system that will consume the S/4HANA Cloud SOAP service. In this example, it's named ā€œCOM_0009_SOAP_OUTā€:

    retail-sap-s4hana-setup-guide-01.png

  2. For the 'Business System' name, use the same name of the System ID.
  3. In the 'Host Name' field, enter the hostname of the Mule application deployed on Cloudhub (if you donā€™t have it yet, you can enter a mock URL and then modify it later):

    retail-sap-s4hana-setup-guide-02.png

  4. Create a user that will be used to connect to the Cloud Hub app for sending product information in the outbound scenario (this is necessary even though the Mule application does not validate the user; we used any user for outbound):

    retail-sap-s4hana-setup-guide-03.png

  5. Use the Communication Arrangement Fiori app to create a new Communication Arrangement:

    retail-sap-s4hana-setup-guide-04.png

  6. Create a new Communication Arrangement, select the communication scenario "SAP_COM_0009", and then define a specific name for the arrangement, "SAP_COM_0009_SOAP".
  7. In the Communication System field, select the Communication System created in the previous step:

    retail-sap-s4hana-setup-guide-05.png

  8. For outbound communication, select the previously-created user and configure the Product Master - Replicate from SAP S/4HANA Cloud to Client and include the following settings. Make sure to note the Path (/sap/bc/srt/scs/sap/productmdmbulkreplicaterequest) because we will use this path to configure the Mule application SOAP endpoint:
    • Set the Service status to Active
    • Replication Model (any name)
    • Replication model = I (Initial)
    • The Output Mode = D (Direct).

      retail-sap-s4hana-setup-guide-06.png

      retail-sap-s4hana-setup-guide-07.png

      retail-sap-s4hana-setup-guide-08.png

  9. Save it. All configurations at S/4HANA Cloud side are finished and you will be able to download the WSDL that contains the metadata to import into the S/4HANA Cloud SOAP Connector into the Mule application.

Configurations in the Mule Application

The following example describes how to create a Mule application using the Outbound Message Listener operation of MuleSoftā€™s SAP S/4HANA SOAP Connector:

  1. Create a Mule project and add the appropriate connector from Exchange to the Mule Palette:

    retail-sap-s4hana-setup-guide-09.png

  2. Add and configure the Outbound Message Listener to the canvas:

    retail-sap-s4hana-setup-guide-10.png

  3. Add the corresponding WSDL path to the WSDL you downloaded from S/4HANA Cloud and create the HTTP listener configuration:

    retail-sap-s4hana-setup-guide-11.png

    retail-sap-s4hana-setup-guide-12.png

    Note: we are using no authentication on the Mule Application, so we used the Insecure option for the Trust Store Configuration. In the Keystore configuration, we used a test Keystore, which is mandatory for HTTPS communication:

    retail-sap-s4hana-setup-guide-13.png

  4. Select the Message type that the connector expects to receive from SAP (the connector reads the metadata from the WSDL we configured):

    retail-sap-s4hana-setup-guide-14.png

  5. On the Responses tab, use the status Code "202" and the Reason-Phrase "Accepted" because we want to send the same status that S/4HANA Cloud will send if the service invocation results OK. No payload will be returned as a responseā€”just the Status code and Reason-phrase:

    retail-sap-s4hana-setup-guide-15.png

  6. Use a Logger component to log the inbound XML payload:

    retail-sap-s4hana-setup-guide-16.png

    The Mule flow should look like the following:

    retail-sap-s4hana-setup-guide-17.png

  7. Deploy the application to Cloudhub. You're now ready to test the scenario.

Testing the scenario

To test the scenario:

  1. Create the following. You only need to create a material in the corresponding Fiori app of S/4HANA Cloud:

    retail-sap-s4hana-setup-guide-18.png

    retail-sap-s4hana-setup-guide-19.png

    retail-sap-s4hana-setup-guide-20.png

    retail-sap-s4hana-setup-guide-21.png

    After you save the new material, you should see the following confirmation in S/4HANA Cloud:

    retail-sap-s4hana-setup-guide-22.png

    The following shows the XML message received at the Mule application at the Runtime Manager on Cloudhub:

    retail-sap-s4hana-setup-guide-23.png

  2. See the sent message in the Message Dashboard Fiori Application:

    retail-sap-s4hana-setup-guide-24.png

  3. Select the date:

    retail-sap-s4hana-setup-guide-25.png

  4. Search under CMD:Product Integration - /CMDPR ā†’ Product Replication to Client via Service - PRDREQ_OUT/00001 namespace:

    retail-sap-s4hana-setup-guide-26.png

    retail-sap-s4hana-setup-guide-27.png

S/4HANA customization guide

The following provides guidance on the custom fields that you must create for both the customer and order sync use cases to function in an end-to-end manner.

Create the following new fields in the corresponding objects for the use case:

Salesforce ObjectField NameData TypeLengthUniqueExternalId
BusinessPartnerYY1_SME_MPARTYROLEID_busText36YY
SalesOrderYY1_SME_MORDERID_SDHText36YY
ProductYY1_SME_UnvProductId_PRDText36YY

The following provides guidance on the custom fields that you must create for both the customer and product sync from SAP S/4HANA to Salesforce Consumer Goods Cloud.

Create the following fields using the app Custom fields:

SAP Field NameLabelData TypeLengthSAP Business Context
YY1_SME_ParentID_RTLParent IDText10Master Data: Business Partner
YY1_SME_AccouTemp_RTLAccount templateText50Master Data: Business Partner
YY1_SME_KAM_Prod_RTLKAM ProductsText40Master Data: Product General
YY1_SME_Comp_Prod_RTLCompetitive ProductCheckbox1Master Data: Product General
YY1_SME_Prod_Temp_RTLProduct templateText50Master Data: Product General
YY1_SME_Prod_Code_RTLProduct codeText50 Master Data: Product General
YY1_SME_Shrt_PCode_RTLShort Product CodeText40Master Data: Product General
YY1_SME_Sell_Code_RTLSell in CodeText40Master Data: Product General
YY1_SME_Asset_Temp_RTLAsset TemplateText20Master Data: Product General
YY1_SME_PackSize_RTLPack SizeDecimal12Master Data: Product General
YY1_SME_PackSizeUn_RTLPack Size UnitText10Master Data: Product General
YY1_SME_ProdForm_RTL Product FormText10Master Data: Product General
YY1_SME_Category_RTLCategoryText40Master Data: Product General
YY1_SME_SubCategor_RTLSubCategoryText40Master Data: Product General
YY1_SME_Brand_RTLBrandText40Master Data: Product General
YY1_SME_Flavor_RTLFlavorText40Master Data: Product General
YY1_SME_Package_RTLPackageText40Master Data: Product General
YY1_SME_Prod_Desc1_RTLDescription 1Text50Master Data: Product General
YY1_SME_Prod_Desc2_RTLDescription 2Text40Master Data: Product General
YY1_SME_DlvValFrom_RTLDelivery Valid FromDateN/AMaster Data: Product General
YY1_SME_FieldValFr_RTLField Valid FromDateN/AMaster Data: Product General
YY1_SME_KAMValFrom_RTLKAM Valid FromDateN/AMaster Data: Product General
YY1_SME_NewItmVldF_RTLNew Item Valid FromDateN/AMaster Data: Product General
YY1_SME_FundValiFr_RTLFund Valid FromDateN/AMaster Data: Product General
YY1_SME_DlvValThru_RTLDelivery Valid ThruDateN/AMaster Data: Product General
YY1_SME_FieldValTh_RTLField Valid ThruDateN/AMaster Data: Product General
YY1_SME_KAMValThru_RTLKAM Valid ThruDateN/AMaster Data: Product General
YY1_SME_NewItmVldT_RTLNew Item Valid ThruDateN/AMaster Data: Product General
YY1_SME_FundValiTh_RTLFund Valid ThruDateN/AMaster Data: Product General
YY1_SME_ManItemNmb_RTLManufacturer Item NumberText20Master Data: Product General
YY1_SME_EstimValue_RTLEstimated ValueText20Master Data: Product General
YY1_SME_PowSuppCon_RTLPower Supply ConnectedCheckboxN/AMaster Data: Product General
YY1_SME_HierarchID_RTLHierarchy IdentifierCode List2Master Data: Product General

As YY1_SME_HierarchID_RTL data type is Code list, the possible values for are:

Code ValueDescription
CACategory
SUSubcategory
BRBrand
FLFlavor
PRProduct

On the section ā€˜UIs and Reportsā€™ for each field enable the corresponding UI app (Business Partner or Product basic data) and the option OData extension model and publish.

To add the fields into each app, use the option Adapt UI from your profile.


Reviews

TypeCustom
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onOct 25, 2022
Asset overview

Asset versions for 2.0.x

Asset versions
VersionActions
2.0.0

Categories

Accelerator
Consumer GoodsNo values left to add
Industry Vertical
RetailConsumer GoodsNo values left to add

Tags